home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / book.exe / NCB.H < prev    next >
C/C++ Source or Header  |  1991-08-31  |  2KB  |  61 lines

  1. /*
  2. //
  3. // NCB.H
  4. //
  5. // (c) Copyright 1990, 1991 Adrian King.
  6. //
  7. // $Header$
  8. //
  9. // $Log$
  10. //
  11. // Header file defining NetBIOS Ncb structure.
  12. // 
  13. */
  14.  
  15. struct Ncb {
  16.     BYTE    NCB_command;            // NCB COMMAND FIELD
  17.     BYTE    NCB_retcode;            // NCB RETURN CODE
  18.     BYTE    NCB_lsn;                // NCB LOCAL SESSION NUMBER
  19.     BYTE    NCB_num;                // NCB ALIAS NUMBER
  20.     char far *    NCB_buffer;         // NCB POINTER TO MESSAGE BUFFER
  21.     WORD    NCB_length;                // NCB LENGTH (IN BYTES)
  22.     BYTE    NCB_callname[D_NAMESZ];    // NCB NAME ON REMOTE ATTACHMENT
  23.     BYTE    NCB_name[D_NAMESZ];        // NCB ALIAS NAME
  24.     BYTE    NCB_rto;                // NCB RECEIVE TIMEOUT
  25.     BYTE    NCB_sto;                // NCB SEND TIMEOUT
  26.     FARPROC NCB_post;                // NCB POINTER TO POST ROUTINE
  27.     BYTE    NCB_lana_num;            // NCB ATTACHMENT #1 FOR SECOND ATTACHMENT
  28.     BYTE    NCB_cmd_cplt;            // COMMAND PENDING INDICATION
  29.     BYTE    NCB_reserve[14];        // NCB RESERVED AREA
  30. };
  31.  
  32. #define    NETBIOS_INT    0x005c        // NetBIOS interrupt number
  33. #define NCBNO_WAIT    0x0080        // Flag for 'no wait' commands
  34.  
  35.     //
  36.     //    NetBIOS command code definitions.
  37.     //
  38.     //    OR these command codes with NCBNO_WAIT for command
  39.     //    with no wait.
  40.     //
  41.  
  42. #define    NCBRESET                0x0032    // Reset local attachment
  43. #define NCBSTATUS                0x0033    // Receive status of sessions
  44. #define NCBCANCEL                0x0035    // Cancel request
  45. #define NCBADDNAME                0x0030    // Add unique name
  46. #define NCBADDGROUPNAME         0x0036    // Add group name
  47. #define NCBDELETENAME            0x0031  // Delete name
  48. #define NCBCALL                 0x0010  // Open session
  49. #define NCBLISTEN                0x0011  // Listen for a call
  50. #define NCBHANGUP                0x0012  // End a session
  51. #define NCBSEND                 0x0014  // Send
  52. #define NCBSENDMULTIPLE         0x0017  // Send multiple
  53. #define NCBRECEIVE                0x0015  // Receive
  54. #define NCBRECEIVEANY            0x0016  // Receive from any
  55. #define NCBSESSIONSTATUS           0x0034  // Session status
  56. #define NCBSENDDATAGRAM         0x0020  // Send a datagram
  57. #define NCBRECEIVEDATAGRAM         0x0021  // Receive a datagram
  58. #define NCBSENDBROADCAST         0x0022  // Send a broadcast datagram
  59. #define NCBRECEIVEBROADCAST      0x0023     // Receive a broadcast datagram
  60. #define NCBINVALID                0x007f    // An invalid NCB command
  61.